package com.dd.cloud.user.mapper.role;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dd.cloud.user.entity.role.UserToRole;
import com.dd.cloud.user.req.role.UserRoleReq;
import org.apache.ibatis.annotations.Param;

import java.util.LinkedList;
import java.util.List;

/**
 * @author zk
 */
public interface UserToRoleMapper extends BaseMapper<UserToRole> {
    /**
     * 批量添加用户与角色的关联
     *
     * @param req
     * @return
     */
    int addBatchUserToRole(@Param("req") UserRoleReq req);

    /**
     * 获取用户的数据权限
     * @param userId
     * @return
     */
    List<String> getUserDataRole(Integer userId, Integer admin);
}
